#ifndef TYPE_H
#define TYPE_H

#include "Item.h"

namespace moses
{
	
	class Type : public Item
	{
	public:
		enum TypeID
		{
			NONE,
			ANY,
			ARRAY,
			BOOL,
			INT,
			FLOAT,
			STRING
		};
		
	public:
		MOSES_ITEM_VISITABLE()
		
		Type(TypeID typeId)
		: m_typeId(typeId)
		{
		}
		
		TypeID GetTypeID() const { return m_typeId; }
		
		bool operator==(const TypeID &id) const
		{
			return m_typeId == id || m_typeId == ANY || id == ANY;
		}
		
		bool operator!=(const Type &type) const
		{
			return !operator==(type);
		}
		
		bool operator==(const Type &type) const
		{
			return type.operator==(m_typeId);
		}
		
	private:
		TypeID m_typeId;
		Type *pSubType;
	};
	
}

#endif